<template>
	<web-view :src="src"></web-view>
</template>

<script setup lang="ts">
	import { onMounted, reactive, ref } from 'vue';
	import { onLoad } from "@dcloudio/uni-app"
import { getStorage } from '../../common/util';
	let url = ''
	let deviceId = ''
	let channelId = ''
	let name = ''
	onLoad((options) => {
		console.info(options)
		url = options.url;
		deviceId = options.deviceId;
		channelId = options.channelId;
		name = options.name;
	})
	const src=ref('')
	onMounted(async () => {
		let userAuth = getStorage('userAuth') || {}
		let str='https://www.tylxj.top/monitor/index.html'
		str+=`?url=${url}`
		str+=`&deviceId=${deviceId}`
		str+=`&channelId=${channelId}`
		str+=`&name=${name}`
		str+=`&token=${userAuth.userToken}`
		src.value=str
		console.info(str)
	})
</script>

<style>

</style>
